<#assign detail>caption: '${item.getCaption()}', itemType: '${item.getItemType()}',visible: <#if item.getPSPanelItemGroupLogic('PANELVISIBLE')??>false<#else>true</#if>, disabled: false, name: '${item.getName()}', panel: this</#assign>
<#if item.getItemType()  == 'CONTAINER'>
new PanelContainerModel({ ${detail} })
<#elseif item.getItemType()  == 'RAWITEM'>
new PanelRawitemModel({ ${detail} })
<#elseif item.getItemType()  == 'FIELD'>
new PanelFieldModel({ ${detail} })
<#elseif item.getItemType()  == 'CONTROL'>
new PanelControlModel({ ${detail} })
<#elseif item.getItemType()  == 'BUTTON'>
new PanelButtonModel({ ${detail}<#if item.getPSUIAction()??><#assign uiaction=item.getPSUIAction()>, uiaction: { type: '${uiaction.getUIActionType()}', tag: '${uiaction.getUIActionTag()}'<#if (uiaction.getActionTarget()!="")>,actiontarget: '${uiaction.getActionTarget()}'</#if><#if uiaction.getNoPrivDisplayMode(view)??>,noprivdisplaymode:${uiaction.getNoPrivDisplayMode(view)}</#if><#if uiaction.getDataAccessAction()??>,dataaccaction:'${uiaction.getDataAccessAction()}'</#if>,visabled: true,disabled: false}</#if> })
<#elseif item.getItemType()  == 'USERCONTROL'>
new PanelUserControlModel({ ${detail} })
<#elseif item.getItemType()  == 'TABPANEL'>
new PanelTabPanelModel({ ${detail}<#if item.getPSPanelTabPages()??>,tabPages:[<#list item.getPSPanelTabPages() as tabpage>{name:'${tabpage.getName()}'}<#if tabpage_has_next>,</#if></#list>]</#if> })
<#elseif item.getItemType()  == 'TABPAGE'>
new PanelTabPageModel({ ${detail} })
</#if>